

#pragma once

#include "unit.h"

class Enemy : public Unit {
public:
	Enemy();
	virtual ~Enemy();

    virtual bool update(float ticks);
	virtual void handleBulletHit(Bullet* bullet, float damageFactor = 1.0f);

protected:
	virtual void handleStateBirth(float ticks);
	virtual void handleStateWalk(float ticks);
	virtual void handleStateStand(float ticks);
	virtual void handleStateMelee(float ticks);
	virtual void handleStateShoot(float ticks);
	virtual void handleStateCast(float ticks);
	virtual void handleStateReload(float ticks);
	virtual void handleStateDying(float ticks);

	virtual void onAttack(EventData* event);

	virtual void attack();
	virtual void shoot();
	virtual void summon();
	virtual void cast();

public:
	vector<Point> waypoints;
	size_t nextWaypointIndex;
	int wayIndex;
};

